const Mock = require('mockjs');
const data = Mock.mock({
    'list|10': [{
        img: '@image(100x100,@color)',
        name: '@ctitle(4)',
        title: '@ctitle(5,10)',
        'price|20-60.1': 0,
        num: 0,
        id: '@id'
    }]
})

console.log(data);

module.exports = {
    devServer: {
        before(app) {
            app.get('/list', (req, res) => {
                res.send(data.list)
            })
        }
    }
}